home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1177_custom_palette_initialization.rtf < prev    next >
Text File  |  1995-06-12  |  2KB  |  44 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Courier;\f2\fmodern Ohlfs;}
  2. \paperw12740
  3. \paperh8500
  4. \margl120
  5. \margr120
  6. {\colortbl;\red0\green0\blue0;\red84\green84\blue84;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q:  
  8. \fc1\cf1 I have created a custom palette.  I want to do some additional initialization in my palette, once the user has dragged it into one of the application's windows, or just before they run the InterfaceBuilder Test Interface mode. Which method does InterfaceBuilder call to communicate with my palette?\
  9.   
  10. \i \
  11.  
  12. \i0 A:  When you drag an object off the Palette, a 
  13. \b read: 
  14. \b0 and an 
  15. \b awake: 
  16. \b0 message are sent after the first 
  17. \b write: 
  18. \b0 message.  Subsequent dragging of the same object generates only a
  19. \b  read:
  20. \b0  and an 
  21. \b awake:
  22. \b0  message. However, each time you go into the InterfaceBuilder Test Interface mode, new instances of each palette object are created so each of those real instances are sent a 
  23. \b write:
  24. \b0  message, then a 
  25. \b read:
  26. \b0  and an 
  27. \b awake:
  28. \b0  message.\
  29. \
  30. This is because InterfaceBuilder treats objects differently when they are in "build" mode vs. "test" mode.\
  31. Note also that during the archiving process, 
  32. \b write:
  33. \b0  methods may be performed twice, so they shouldn't do anything other than write instance variables to a typed stream.\
  34. \
  35.  
  36. \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc1\cf1    
  37. \f1\fs24      
  38. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\fs28\fc1\cf1 \
  39. Valid for 2.0, 3.0, 3.1\
  40. \
  41. QA716\
  42. \
  43.  
  44.